<template>
	<view class="disease-contain">
		<view class="tabs-list">
			<view class="tabs-box">
				<view class="tabs-item" v-for="(item,index) in tabsType" :key="item.name" @click="activeName=index"
					:class="{'active-tab':activeName==index,'active-right':activeName==index+1,'active-left':activeName==index-1}">
					{{item.name}}
				</view>
			</view>
			<view class="tab-content">
				<view class="tab-1" v-show="activeName==0">
					<view class="list-1" v-for="(item,index) in 4" :key="item" :class="index==3?'no-border':''">
						<view class="left-item">
							<view class="left-title">
								缺血性心脏病缺血性心脏病包括粥样硬化病变引致的缺血性心脏病缺血性心脏病包括粥样硬化病变引致的
							</view>
							<view class="left-btom">
								<view class="left-num">
									<image class="left-avatar" src="@/static/sculpture.png" mode="scaleToFill"></image>
									<span class="left-names">姓名</span>
								</view>
								<span class="click-nums">
									浏览3245
								</span>
							</view>
						</view>
						<image class="photo-img" src="@/static/wei.png" mode="scaleToFill"></image>
					</view>
					<image style="width: 50%;margin-left: 25%;" src="@/static/icon/nothing.png" mode="widthFix" v-if="tablelist.length<=0"></image>
				</view>
				<view class="tab-2" v-show="activeName==1">
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				activeName:0,
				tablelist:[],
				tabsType: [{
						name: '疾病预防'
					},
					{
						name: '慢病管理'
					},
				],
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.disease-contain{
		padding: 0 30rpx;
	}
.tabs-list {
		box-shadow: 0rpx 0rpx 10rpx 4rpx rgba(0, 0, 0, 0.06);
		border-radius: 20rpx;
		margin: 20rpx 0;
	}
.tabs-box {
		width: 100%;
		display: flex;
		border-radius: 20rpx 20rpx 0rpx 0rpx;
		background: linear-gradient(#EBEFF7 50%, #fff 100%);
		overflow: hidden;

		.tabs-item {
			flex: 1;
			text-align: center;
			background-color: #EBEFF7;
			padding: 30rpx 0;
			text-align: center;
			font-weight: 500;
			color: #080808;
		}

		.active-tab {
			background-color: #fff;
			border-radius: 20rpx 20rpx 0rpx 0rpx;
			position: relative;
		}

		.active-tab::after {
			content: "";
			width: 40rpx;
			height: 8rpx;
			background: #40D49F;
			box-shadow: 0rpx 0rpx 6rpx 0rpx #40D49F;
			border-radius: 4rpx;
			position: absolute;
			bottom: 0;
			left: calc(50% - 20rpx);
		}

		.active-right {
			border-radius: 0rpx 0rpx 20rpx 0rpx;
		}

		.active-left {
			border-radius: 0rpx 0rpx 0rpx 20rpx;
		}
	}
.tab-content {
			width: 100%;
			padding: 30rpx;
			background-color: #fff;
			border-radius: 0rpx 0rpx 20rpx 20rpx;

			.tab-1 {
				width: 100%;
				border-radius: 14rpx;
				.list-1{
					width: 100%;
					display: flex;
					height: 220rpx;
					padding: 20rpx;
					border-bottom: 1rpx solid #E8E8E8;
					.left-item{
						 flex: 1;
						 display: flex;
						 height: 180rpx;
						 flex-direction: column;
						 justify-content: space-between;
						.left-title{
							font-size: 28rpx;
							width: 100%;
							font-weight: 500;
							color: #333333;
							overflow:hidden;
							text-overflow:ellipsis;
							display:-webkit-box; 
							padding-right:20rpx;
							-webkit-box-orient:vertical;
							-webkit-line-clamp:2;
						}
						.left-btom{
							width: 100%;
							display: flex;
							justify-content: space-between;
							padding-right:20rpx;
							.left-num{
								display: flex;
								.left-avatar{
									width: 40rpx;
									height: 40rpx;
								}
								.left-names{
									font-size: 26rpx;
									font-weight: 500;
									color: #333333;
								}
							}
							.click-nums{
								font-size: 26rpx;
								font-weight: 400;
								color: rgba(51,51,51,0.7);
							}
						}
					}
					.photo-img{
						width: 230rpx;
						height: 180rpx;
					}
				}
				.no-border{
					border-bottom: none;
					padding-bottom: 0rpx;
				}
				
			}

			.tab-2 {
				width: 100%;
				display: flex;
				padding: 20rpx;
				border-radius: 14rpx;
				justify-content: space-between;
			}
		}		
		
		
</style>
